<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>

    // 数组解构
    let arr = [1,2,3]
    let a = arr[0]
    let b = arr[1]
    let c = arr[2]

    let[d,e,f] = arr

    console.log(a)
    console.log(b)
    console.log(c)

    console.log(d,e,f)

    // 对象解构
    const person = {
        name: "jack",
        age: 21,
        language:['css','js']
    }

    // const name = person.name
    // const age = person.age
    // const language = person.language
    // console.log(name,age,language)

    const {name, age, language} = person
    console.log(name,age,language)


</script>
</body>
</html>